\subsection{Contraction mappings}
\begin{definition}
	A function \( f \colon M \to M' \) is called a \textit{contraction mapping} if \( \exists \lambda, 0 \leq \lambda < 1 \) such that
	\[
		\forall x,y \in M, d'(f(x),f(y)) \leq \lambda d(x,y)
	\]
	so \( f \) is \( \lambda \)-Lipschitz.
\end{definition}

\subsection{Contraction mapping theorem}
This theorem is also called Banach's fixed point theorem.
\begin{theorem}
	Let \( M \) be a non-empty complete metric space.
	Let \( f \colon M \to M \) be a contraction mapping.
	Then \( f \) has a unique fixed point:
	\[
		\exists!
		z \in M, f(z) = z
	\]
\end{theorem}
\begin{proof}
	Let \( \lambda \) such that \( 0 \leq \lambda < 1 \) and \( \forall x,y \in M, d'(f(x),f(y)) \leq \lambda d(x,y) \).
	First we show uniqueness.
	Suppose there were two fixed points \( f(z) = z, f(w) = w \).
	Then \( d(z,w) = d(f(z), f(w)) \leq \lambda d(z,w) < d(z,w) \).
	Hence \( d(z,w) = 0 \) so \( z = w \).

	Now we show existence.
	Fix a starting point \( x_0 \in M \).
	Let \( x_n = f(x_{n-1}) \) for all \( n \in \mathbb N \), so \( x_n = f^n(x_0) \).
	First, observe that for all \( n \in \mathbb N \),
	\[
		d(x_n, x_{n+1}) = d(f(x_{n-1}), f(x_n)) \leq \lambda d(x_{n-1}, x_n) \leq \dots \leq \lambda^n d(x_0, x_1)
	\]
	For \( m \geq n \), we have
	\[
		d(x_n, x_m) \leq \sum_{k=n}^{m-1} d(x_k, x_{k+1}) \leq \sum_{k=n}^{m-1} \lambda^k d(x_0, x_1) \leq \frac{\lambda^n}{1-\lambda} d(x_0, x_1)
	\]
	Since \( \frac{\lambda^n}{1 - \lambda} d(x_0, x_1) \to 0 \),
	\[
		\forall \varepsilon > 0, \exists N \in \mathbb N, \forall n \geq N, \frac{\lambda^n}{1-\lambda} d(x_0, x_1) < \varepsilon
	\]
	Hence, \( \forall m \geq n \geq N, d(x_n, x_m) < \varepsilon \).
	So the sequence \( (x_n) \) is Cauchy.
	Since \( M \) is complete, \( (x_n) \) is convergent to some point \( z \in M \).
	\( f \) is continuous since it is a contraction, so \( f(x_n) \to z \) so \( f(z) = z \).
	So the fixed point exists.
\end{proof}
\begin{remark}
	Letting \( m \to \infty \) in the inequality for \( d(x_n, x_m) \), \( d(x_n, z) \leq \frac{\lambda^n}{1-\lambda} d(x_0, x_1) \).
	So \( x_n \to z \) exponentially fast.
	Consider \( f \colon \mathbb R \setminus \qty{0} \to \mathbb R \setminus \qty{0} \), and \( x \mapsto \frac{x}{2} \).
	This is a contraction, but there is no fixed point.
	This is because \( \mathbb R \setminus \qty{0} \) is not complete.
	Consider instead \( f \colon \mathbb R \to \mathbb R \), \( x \mapsto x + 1 \).
	This has no fixed point, since \( f \) is an isometry (\( \lambda = 1 \)) and not a contraction.
	Consider further \( f \colon [1,\infty) \to [1,\infty) \) mapping \( x \mapsto x + \frac{1}{x} \).
	Certainly \( \abs{f(x) - f(y)} < \abs{x-y} \).
	\( [1,\infty) \) is closed in \( \mathbb R \) so it is complete.
	However this is not a contraction; even though \( \abs{f(x) - f(y)} < \abs{x-y} \), there is no upper bound \( \lambda \).
	There are no fixed points.
\end{remark}

\subsection{Application of contraction mapping theorem}
Let \( y_0 \in \mathbb R \).
Then the initial value problem \( f'(t) = f(t^2) \) and \( f(0) = y_0 \) has a unique solution on \( \qty[0, \frac{1}{2}] \).
In other words, there exists a unique differentiable function \( f \colon \qty[0, \frac{1}{2}] \to \qty[0, \frac{1}{2}] \) such that \( f(0) = y_0 \) and \( f'(t) = f(t^2) \) for all \( t \) in the domain.

First, observe that if \( f \) is a solution then certainly it is continuous, so \( f \in C\qty[0, \frac{1}{2}] \).
Further, by the fundamental theorem of calculus, it satisfies
\[
	f(t) = y_0 + \int_0^t f(s^2) \dd{s}
\]
Note that \( f'(s) = f(s^2) \) is continuous.
Conversely, if \( f \in C\qty[0, \frac{1}{2}] \) and \( f(t) = y_0 + \int_0^t f(s^2) \dd{s} \) then \( f \) is a solution to the initial value problem.

Let \( M = C\qty[0,\frac{1}{2}] \) with the uniform metric.
This is non-empty and complete.
Then we define the map \( T \colon M \to M \) by
\[
	(Tg)(t) = y_0 + \int_0^t g(s^2) \dd{s}
\]
Note that \( Tg \) is well-defined since \( g(s^2) \) is continuous.
Moreover, by the fundamental theorem of calculus, \( Tg \) is differentiable and \( (Tg)'(t) = g(t^2) \).
Thus, \( f \) is a solution to the initial value problem if and only if \( f \in M \) and \( Tf = f \).

Now, if \( T \) is a contraction, we can use the contraction mapping theorem to assert that there is exactly one fixed point.
For \( g,h \in M \), \( t \in \qty[0, \frac{1}{2}] \), consider
\[
	\abs{(Tg)(t) - (Th)(t)} = \abs{\int_0^t \qty[g(s^2) - h(s^2)] \dd{s}} \leq t \sup_{s \in \qty[0, \frac{1}{2}]} \abs{g(s^2) - h(s^2)} \leq \frac{1}{2} D(g,h)
\]
Taking the supremum over \( t \) gives \( D(Tg, Th) \leq \frac{1}{2} D(g,h) \), and so there is exactly one fixed point.
\begin{remark}
	The above shows that for any \( \delta \in (0, 1) \) there is a unique solution to the initial value problem on \( [0, \delta] \), called \( f_\delta \), since \( \delta < 1 \) is required for the map to be a contraction.
	For \( 0 < \delta < \mu < 1 \), \( \eval{f_\mu}_{[0,\delta]} = f_\delta \) by uniqueness.
	So we can combine the solutions together to yield a unique solution on \( [0,1) \).
\end{remark}

\subsection{Lindel\"of--Picard theorem}
\begin{theorem}
	Let \( n \in \mathbb N \), \( y_0 \in \mathbb R^n \), and \( a,b,R \in \mathbb R \), such that \( a < b \) and \( R > 0 \).
	Let \( \phi \colon [a,b] \times \mathcal B_R(y_0) \to \mathbb R^n \) be a continuous function.
	Given that there exists \( K > 0 \) such that \( \forall t \in [a,b], \forall x,y \in \mathcal B_R(y_0) \), such that
	\[
		\norm{\phi(t,x) - \phi(t,y)} \leq K \norm{x-y}
	\]
	Then, \( \exists \varepsilon > 0 \) such that \( \forall t, t_0 \in [a,b] \), the initial value problem
	\[
		f'(t) = \phi(t, f(t));\quad f(t_0) = y_0
	\]
	has a unique solution on \( [c,d] = [t_0 - \varepsilon, t_0 + \varepsilon] \cap [a,b] \).
\end{theorem}
\begin{remark}
	If \( f \) is a solution of the initial value problem, implicitly this includes the assumption that \( f(t) \in B_r(y_0) \) for all \( t \in [c,d] \).
	Note that if \( f \colon [c,d] \to \mathbb R^n \), we let \( f_k \colon [c,d] \to \mathbb R \) be the \( k \)th component of \( f \), and \( f_k = q_k \circ f \) where \( q_k \) is the \( k \)th coordinate projection.
	Then, \( f(t) = (f_1(t), \dots, f_n(t)) \) and we define \( f \) to be differentiable if and only if all of the components are differentiable, with \( f'(t) = (f_1'(t), \dots, f_n'(t)) \).
	Note further, if \( f \) is continuous, then so are \( f_k \), hence \( f_k \) are integrable.
	So we define
	\[
		\int_c^d f(t) \dd{t} = v = \qty(\int_c^d f_1(t) \dd{t}, \dots, \int_c^d f_n(t) \dd{t})
	\]
	Note that we can use the Cauchy--Schwarz inequality to give
	\begin{align*}
		\norm{v}^2 & = \sum_{k=1}^n v_k^2                            \\
		           & = \sum_{k=1}^n v_k \int_c^d f_k(t) \dd{t}       \\
		           & = \int_c^d \sum_{k=1}^n v_k f_k(t) \dd{t}       \\
		           & = \int_c^d v \cdot f(t) \dd{t}                  \\
		           & \leq \int_c^d \norm{v} \cdot \norm{f(t)} \dd{t} \\
		           & = \norm{v} \int_c^d \norm{f(t)} \dd{t}
	\end{align*}
	Hence,
	\[
		\norm{\int_c^d f(t) \dd{t}} \leq \int_c^d \norm{f(t)} \dd{t} \leq (d-c) \sup_{t \in [c,d]} \norm{f(t)}
	\]
\end{remark}
\begin{proof}
	Recall that closed balls are closed, hence \( \mathcal B_R(y_0) \) is a closed subset of \( \mathbb R^n \).
	So \( \phi \) is a continuous function on the closed and bounded set \( [a,b] \times \mathcal B_R(y_0) \).
	It follows that \( \phi \) is bounded.
	Now, let \( c = \sup \qty{ \norm{\phi(t,x)} \colon t \in [a,b], x \in \mathcal B_R(y_0) } \).
	Let \( \varepsilon = \min(\frac{R}{c}, \frac{1}{2K}) \).
	Let \( t_0 \in [a,b] \) and let \( [c,d] = [t_0 - \varepsilon, t_0 + \varepsilon] \cap [a,b] \).
	We need to show that there exists a unique differentiable function \( f \colon [c,d] \to \mathbb R^n \) such that \( f(t_0) = y_0 \) and \( f'(t) = \phi(t,f(t)) \) for all \( t \in [c,d] \).
	Since \( \mathcal B_R(y_0) \) is closed in \( \mathbb R^n \), and since \( \mathbb R^n \) is complete, \( \mathcal B_R(y_0) \) is complete.
	Then, \( M = C([c,d], \mathcal B_R(y_0)) \) is complete in the uniform metric \( D \).
	This is certainly non-empty; consider the constant function yielding \( y_0 \).
	\( f \) is a solution to the initial value problem if \( f \in M \) and \( f'(t) = y_0 + \int_{t_0}^t \phi(s, f(s)) \dd{s} \), from the fundamental theorem of calculus applied coordinatewise.
	We define \( T \colon M \to M \) mapping \( g \mapsto Tg \) where \( Tg \) is given by
	\[
		(Tg)(t) = y_0 + \int_{t_0}^t \phi(s, g(s)) \dd{s}
	\]
	We must show \( T \) is well defined.
	First, note that the integral is well defined; \( s \mapsto \phi(s,g(s)) \) is continuous so integrable.
	By the fundamental theorem of calculus, \( Tg \) is differentiable and the derivative is \( (Tg)'(t) = \phi(t,g(t)) \).
	In particular, \( Tg \colon [c,d] \to \mathbb R^n \) is continuous.
	Finally, for \( t \in [c,d] \),
	\[
		\norm{(Tg)(t) - y_0} = \norm{\int_{t_0}^t \phi(s, g(s)) \dd{s}} \leq \abs{t - t_0} \sup_{s \in [c,d]} \norm{\phi(s,g(s))} \leq \varepsilon c \leq R
	\]
	So \( Tg \in M \).
	Recall that \( f \) is a solution of the initial value problem if and only if \( f \in M \) and \( Tf = f \).
	Now we must show that \( T \) has a unique fixed point, so we will show that \( T \) is a contraction.
	Let \( t \in [c,d] \) and \( g,h \in M \).
	\[
		\norm{(Tg)(t) - (Th)(t)} = \norm{\int_{t_0}^t \qty[ \phi(s,g(s)) - \phi(s,h(s)) ] \dd{s}}
	\]
	Note that \( \norm{\phi(s,g(s)) - \phi(s,h(s))} \leq K \norm{g(s) - h(s)} \leq K \cdot D(g,h) \).
	\[
		\norm{(Tg)(t) - (Th)(t)} = \abs{t-t_0} \cdot K \cdot K(g,h) \leq \varepsilon K D(g,h)
	\]
	Taking the supremum over \( t \in (c,d) \),
	\[
		D(Tg, Th) \leq \varepsilon K D(g,h) \leq \frac{1}{2} D(g,h)
	\]
	So \( T \) is a contraction.
	By the contraction mapping theorem, \( T \) has a unique fixed point in \( M \).
\end{proof}
\begin{remark}
	For any \( \delta \in (0,1) \), taking \( \varepsilon = \min(\frac{R}{c}, \frac{\delta}{K}) \) works.
	But by the uniqueness of the solution, the choice does not matter for constructing the solution.
	So we can construct the solution for \( \varepsilon = \min(\frac{R}{c}, \frac{1}{K}) \), on \( (t_0 - \varepsilon, t_0 + \varepsilon) \cap [a,b] \).
	In general, there is no solution on \( [a,b] \).
	Finally, note that the above theorem can handle any \( n \)th order ODE for any \( n \in \mathbb N \).
\end{remark}
